Skip to content

feat(manifest): explicit enable_constraints field; cap enabled_count at 8#70

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/explicit-enable-constraints
May 14, 2026
Merged

feat(manifest): explicit enable_constraints field; cap enabled_count at 8#70
hyperpolymath merged 1 commit into
mainfrom
fix/explicit-enable-constraints

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Per V-L2-D1: Make Constraints a first-class octad dimension instead of an implicit "+1 when count>2" arithmetic side-effect, and prove the cap.

  • Add enable_constraints: bool to OctadConfig (default true)
  • Rewrite enabled_count() to be a pure sum over the six togglable flags; result guaranteed in 2..=8 by construction
  • print_status reads enable_constraints directly; toggling a different dimension no longer flips the Constraints line
  • init_manifest template emits enable-constraints = true

Closes

Test plan

  • cargo clippy --all-targets -- -D warnings clean
  • 29 unit tests pass (3 new in manifest::octad_tests)
  • Exhaustive 64-case test asserts enabled_count() ∈ 2..=8
  • All 7 existing OctadConfig { ... } literals updated with the new field

Closes #34.

OctadConfig previously had no `enable_constraints` field. The Constraints
dimension was "implied" via `if enabled_count > 2 { count += 1; }`,
which meant:

  1. Toggling any other dimension silently flipped Constraints
     ON or OFF in `print_status`.
  2. The cap of 8 dimensions was implicit; nothing prevented overflow.
  3. ADR-0001's first-class treatment of Constraints had no
     representation in the data model.

Changes:

- Add `enable_constraints: bool` to `OctadConfig` (defaults to true,
  serde rename `enable-constraints`).
- Rewrite `enabled_count()` to count each `enable_*` field once. The
  implicit `+1` arithmetic is gone; the result is now guaranteed to be
  in `2..=8` by construction.
- `print_status` reads `enable_constraints` directly instead of
  inferring it from the total count.
- `init_manifest` template emits `enable-constraints = true`.
- Update six existing test fixtures and one integration test that
  construct OctadConfig literals to include the new field.

Add three new unit tests in `manifest::octad_tests`:

- `enabled_count_is_in_range_2_to_8`: exhaustively checks all 64
  combinations of the six togglable flags and asserts the result is
  always in 2..=8.
- `enabled_count_with_all_off_is_two`: data + metadata baseline.
- `enabled_count_with_all_on_is_eight`: full octad.

`cargo clippy --all-targets -- -D warnings` clean; 29 unit tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 4315990 into main May 14, 2026
15 of 17 checks passed
@hyperpolymath
hyperpolymath deleted the fix/explicit-enable-constraints branch May 14, 2026 13:53
hyperpolymath added a commit that referenced this pull request Jun 26, 2026
## What & why

The Zig FFI bridge is half of the ABI-FFI standard, but nothing
installed Zig — `.tool-versions` only lists it (commented), `setup.sh`
stopped at `just`, and the devcontainer's `postCreateCommand: just deps`
referenced a `deps` recipe that didn't exist. And Zig is **not**
distributed via GitHub releases, so it must come from `ziglang.org`,
which isn't on the agent egress allowlist by default.

## Change

- **`scripts/install-zig.sh`** — idempotent, fail-soft installer for the
pinned **Zig 0.14.0** (arch/OS-aware, uses the proxy-populated system CA
store, never `--insecure`). If `ziglang.org` is blocked it 403s and
exits 0 with an actionable message, so it never blocks setup.
- **`setup.sh`** — adds a Zig install step (where the template exposes
one).
- **`Justfile`** — new `deps` recipe (install Zig + `cargo fetch`)
backing the devcontainer `postCreateCommand: just deps`.

Once `ziglang.org` is allowlisted, future setups/dev-containers install
Zig automatically. Part of a family-wide sweep; mirrors the merged
iseriser reference (#70). (This repo already had a SessionStart hook;
that is left untouched.)

## CI note

The `rust-ci` and `Hypatia` checks are **pre-existing estate-infra
reds** (the reusable rust-ci workflow's empty `toolchain` input, and the
Hypatia analyzer failing to compile its own Elixir source) — neither is
caused by this shell/Justfile change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH

---
_Generated by [Claude
Code](https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V-L2-D1: explicit enable_constraints + cap enabled_count at 8

1 participant